/* 加载动画 */
.loading{
    position: fixed;
    display: flex; /* 添加 flex 布局 */
    flex-direction: column;
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #f7f7f7;
    z-index: 100000000;
    transition: 1s ease;
}

.loading svg{
    width: 5rem;
    margin-bottom: 2rem;
    overflow: visible;
    transition: 0.3s ease;
}

.loading svg circle{
    fill: none;
    stroke: #171717;
    stroke-width: 12;
    stroke-dasharray: 160;
    stroke-dashoffset: 160;
    transform-origin: center;
    animation: circle_rotate 1s ease-in-out infinite;
}

.loading p{
    font-size: large;
    display: flex; /* 添加 flex 布局 */
    flex-direction: column;
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
}

@keyframes circle_rotate {
    0% {
    transform: rotate(0deg);
    stroke-dashoffset: 160;
    }
    100%{
    transform: rotate(360deg);
    stroke-dashoffset: -160;
    }
    
}

.loading_out{
    transform: translateY(100%);
}
.loading_out svg{
    opacity: 0;
}

@keyframes intro_left_right{
    0%{
        color: white;
        padding-right: 50px;
    }
    100%{
        color: black;
    }
}

@keyframes intro_up_down{
    0%{
        color: white;
        padding-top: 50px;
    }
    100%{
        color: black;
    }
}

@keyframes rainbow_color {
    0% {
        color: red;
    }
    14% {
        color: orange;
    }
    28% {
        color: yellow;
    }
    42% {
        color: green;
    }
    57% {
        color: blue;
    }
    71% {
        color: indigo;
    }
    85% {
        color: violet;
    }
    100% {
        color: red;
    }
}

#writer{
    animation: intro_left_right;
    animation-fill-mode: backwards;
    animation-duration: 1s;
    animation-timing-function: ease-out;

    text-align: right;
    padding-right: 10px;
}
#writer:hover{
    animation: rainbow_color 5s infinite;
}

h1{
    animation: intro_up_down;
    animation-fill-mode: backwards;
    animation-duration: 600ms;
    text-align: center;
}
h2{
    margin-left: 10px;
}
p{
    margin-left: 40px;
}

.code {
    background-color: #313131;
    color: #d4d4d4;
    padding: 10px;
    border-radius: 10px;
    white-space: pre-wrap;
    transition: transform 0.2s ease;
}
.code:hover{
    transform: scale(1.05);
}
.code .string { color: #ce9178; }
.code .key { color: #9cdcfe; }
.code .braces { color: #d4d4d4; }
.code .brackets { color: #d4d4d4; }
.code .colon { color: #d4d4d4; }
.code .comma { color: #d4d4d4; }


.question{
    margin-left: 20px;
    margin-right: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid black;
    border-radius: 10px;
    transition: background-color 0.4s ease-in-out, transform 0.2s ease;
}

.question:hover{
    background-color: #f0f0f080;
}

.options{
    margin-left: 20px;
    margin-right: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 3px 10px;
}

.option{
    display: block;
    font-size: 1em;
    margin: 5px 10px;
    padding: 5px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    border-radius: 10px;
}

.option:hover{
    background-color: #f0f0f0;
    transform: scale(1.05);
}

.feedback{
    margin-left: 40px;
}